/*
 * @Descripttion: 
 * @version: 
 * @Author: 高月飞
 * @Date: 2023-11-17 19:15:56
 * @LastEditors: 高月飞
 * @LastEditTime: 2023-11-24 21:01:06
 */

/**
 * 导入配置
 */

import { createApp } from 'vue'
//pinia
import { createPinia } from 'pinia'
//pinia持久化
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
//路由
import router from './router'

//完整引入element组件库
//element-ui--plus
import ElementPlus from 'element-plus'
//element-CSS
import 'element-plus/dist/index.css'


//引入全局图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//国际化
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 引入阿里云字体图标css
import './assets/icon/iconfont.css'
// 全局组件
import registerGlobComp from "./component/index"
/**
 * 创建
 */

const app = createApp(App)
const pinia = createPinia();

/**
 * 挂载配置
 */

//挂载pinia
app.use(pinia);
//挂载数据持久化
pinia.use(piniaPluginPersistedstate);
//挂载路由
app.use(router)
//挂载element - ui 国际化（翻译成中文）
// 挂载全局组件
app.use(registerGlobComp)
//挂载element - ui
app.use(ElementPlus, {
  locale: zhCn,
})


for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
//挂载实力App
app.mount('#app')

